Question Description
#include<iostream>using namespace std;class Base{public: void show() { cout<<" In Base "; }};class Derived: public Base{public: int x; void show() { cout<<"In Derived "; } Derived() { x = 10; }};int main(void){ Base *bp, b; Derived d; bp = &d; bp->show(); cout << bp->x; return 0;}a)Compiler Error in line " bp->show()"b)Compiler Error in line " cout << bp->x"c)In Base 10d)In Derived 10Correct answer is option 'B'. Can you explain this answer? for EmSAT Achieve 2025 is part of EmSAT Achieve preparation. The Question and answers have been prepared
according to
the EmSAT Achieve exam syllabus. Information about #include<iostream>using namespace std;class Base{public: void show() { cout<<" In Base "; }};class Derived: public Base{public: int x; void show() { cout<<"In Derived "; } Derived() { x = 10; }};int main(void){ Base *bp, b; Derived d; bp = &d; bp->show(); cout << bp->x; return 0;}a)Compiler Error in line " bp->show()"b)Compiler Error in line " cout << bp->x"c)In Base 10d)In Derived 10Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for EmSAT Achieve 2025 Exam.
Find important definitions, questions, meanings, examples, exercises and tests below for #include<iostream>using namespace std;class Base{public: void show() { cout<<" In Base "; }};class Derived: public Base{public: int x; void show() { cout<<"In Derived "; } Derived() { x = 10; }};int main(void){ Base *bp, b; Derived d; bp = &d; bp->show(); cout << bp->x; return 0;}a)Compiler Error in line " bp->show()"b)Compiler Error in line " cout << bp->x"c)In Base 10d)In Derived 10Correct answer is option 'B'. Can you explain this answer?.
Solutions for #include<iostream>using namespace std;class Base{public: void show() { cout<<" In Base "; }};class Derived: public Base{public: int x; void show() { cout<<"In Derived "; } Derived() { x = 10; }};int main(void){ Base *bp, b; Derived d; bp = &d; bp->show(); cout << bp->x; return 0;}a)Compiler Error in line " bp->show()"b)Compiler Error in line " cout << bp->x"c)In Base 10d)In Derived 10Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for EmSAT Achieve.
Download more important topics, notes, lectures and mock test series for EmSAT Achieve Exam by signing up for free.
Here you can find the meaning of #include<iostream>using namespace std;class Base{public: void show() { cout<<" In Base "; }};class Derived: public Base{public: int x; void show() { cout<<"In Derived "; } Derived() { x = 10; }};int main(void){ Base *bp, b; Derived d; bp = &d; bp->show(); cout << bp->x; return 0;}a)Compiler Error in line " bp->show()"b)Compiler Error in line " cout << bp->x"c)In Base 10d)In Derived 10Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of
#include<iostream>using namespace std;class Base{public: void show() { cout<<" In Base "; }};class Derived: public Base{public: int x; void show() { cout<<"In Derived "; } Derived() { x = 10; }};int main(void){ Base *bp, b; Derived d; bp = &d; bp->show(); cout << bp->x; return 0;}a)Compiler Error in line " bp->show()"b)Compiler Error in line " cout << bp->x"c)In Base 10d)In Derived 10Correct answer is option 'B'. Can you explain this answer?, a detailed solution for #include<iostream>using namespace std;class Base{public: void show() { cout<<" In Base "; }};class Derived: public Base{public: int x; void show() { cout<<"In Derived "; } Derived() { x = 10; }};int main(void){ Base *bp, b; Derived d; bp = &d; bp->show(); cout << bp->x; return 0;}a)Compiler Error in line " bp->show()"b)Compiler Error in line " cout << bp->x"c)In Base 10d)In Derived 10Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of #include<iostream>using namespace std;class Base{public: void show() { cout<<" In Base "; }};class Derived: public Base{public: int x; void show() { cout<<"In Derived "; } Derived() { x = 10; }};int main(void){ Base *bp, b; Derived d; bp = &d; bp->show(); cout << bp->x; return 0;}a)Compiler Error in line " bp->show()"b)Compiler Error in line " cout << bp->x"c)In Base 10d)In Derived 10Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an
ample number of questions to practice #include<iostream>using namespace std;class Base{public: void show() { cout<<" In Base "; }};class Derived: public Base{public: int x; void show() { cout<<"In Derived "; } Derived() { x = 10; }};int main(void){ Base *bp, b; Derived d; bp = &d; bp->show(); cout << bp->x; return 0;}a)Compiler Error in line " bp->show()"b)Compiler Error in line " cout << bp->x"c)In Base 10d)In Derived 10Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice EmSAT Achieve tests.